<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
    <h4 class="modal-title">{{{ @$User->username }}}</h4>
</div>
<div class="portlet modal-body portlet-body form">
    <!-- BEGIN FORM-->
    <form action="{{ route('review-update') }}" class="form-horizontal" id="form-review" method="post">
        <input type="hidden" name="class_id" value="{{$Classes->id}}"/>
        <input type="hidden" name="user_id" value="{{$User->id}}"/>
        <div class="form-body">
            <div class="alert alert-danger display-hide">
                <button class="close" data-close="alert"></button>
                {{ trans('validation.custom.error-title') }}
            </div>
            <div class="alert alert-success display-hide">
                <button class="close" data-close="alert"></button>
                <span></span>
            </div>
            <div class="form-group" style="margin-left: 0; margin-right: 0;">
                <label class="control-label col-md-3" for="rank">{{ trans('review.rank') }}</label>
                <div class="col-md-7">
                    <select name="rank" id="rank" class="form-control">
                        @foreach ($Option['RANK'] as $key => $Info )
                        <option value="{{ $Info->key }}" {{ $pivot->rank == $Info->key ? 'selected="selected"' : null }}>
                            {{ $Info->data }}
                        </option>
                        @endforeach
                    </select>
                </div>
            </div>
            <div class="form-group" style="margin-left: 0; margin-right: 0;">
                <label class="control-label col-md-3" for="type">{{ trans('system.note') }}</label>
                <div class="col-md-7">
                    <textarea name="note" id="note" class="form-control">{{$pivot->note}}</textarea>
                </div>
            </div>
        </div>
    </form>
    <!-- END FORM-->
</div>
<div class="modal-footer">
    <button type="button" class="btn default btn-close-modal" data-dismiss="modal">{{ trans('system.button.cancel') }}</button>
    <button type="button" class="btn blue btn-updateReview {{ CNamHoa::getHideClass('review-update', ['addClass' => 'hide']) }}">{{ trans('system.button.submit') }}</button>
</div>
<script type="text/javascript">
    
    var form = $('#form-review');
    
    form.keypress(function(e) {
        if (e.which == '13') {
            $('.btn-updateReview').trigger('click');
            return false;
        }
    });
</script>